Repository navigation
gh-159425: Fix concurrent zlib compressor test with intermediate output - #159429
Open
zolaski333 wants to merge 1 commit into
Open
zolaski333 wants to merge 1 commit into
zolaski333 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #159425.
The concurrent compressor test assumes that subsequent
compress()callsreturn empty bytes. This fails with the s390x hardware accelerator and can also
fail with ordinary zlib when it emits intermediate output.
Collect the actual output of two concurrent calls on the same compressor and
try both possible output orders, since threads can append their results in a
different order from the compressor's internal serialization. Require an exact
round trip, end of stream, and no trailing data. This keeps the calls concurrent
without requiring reproducible compressed bytes or adding an external lock.
Exercise both the existing default-compression input and large uncompressed
blocks that emit intermediate output. Add a Tests NEWS entry.
Validation on Windows x64 with zlib-ng 2.2.4:
-X dev -m test test_free_threading.test_zlib test_zlib test_gzip(171 tests run, 2 skipped in each mode).
-X dev -m test -R 3:3 test_free_threading.test_zlib test_zlib(92 tests run, 1 skipped; no reference leaks detected).
input, truncated streams, and trailing data. Reversed result collection and
eager intermediate output pass.
Tools/patchcheck/patchcheck.pyandgit diff --checkpass.s390x hardware validation has not been performed; confirmation on an affected
builder is still needed.